package structural.facade;

public class Facade {

    public void runSystemA(){
        getSystemA().run();
    }

    public void runSystemB(){
        getSystemB().run();
    }



    private SystemA getSystemA(){
        return new SystemA() {
            @Override
            public void run() {
                System.out.println("运行A系统");
            }
        };
    }

    private SystemB getSystemB(){
        return new SystemB() {
            @Override
            public void run() {
                System.out.println("运行B系统");
            }
        };
    }
}
